1. Field of the Invention
The present invention relates to an image processing method, an image processing apparatus, and a computer-readable storage medium for a computer program for extracting edges included in a color image.
2. Description of the Related Art
Edge extraction, or sometimes called “contour extraction”, for extracting edges in an image is known as one of image processing ways for modifying or editing images. The edge discussed here is a line element that characterizes shape information of an image, and is a border between neighboring regions having prominent differences in density or color from each other. For example, an outer edge of a character or a drawing in a business document corresponds to the edge. The processing result from edge extraction is used in image quality control for enhancing the edge, or image editing for moving a region enclosed by edges or changing colors of the region.
A method for converting a color image into a gray scale image is common as a method for extracting edges included in a color image. In this method, lightness is focused among three properties expressing colors (lightness, hue, and saturation), and a border between regions having different lightness is extracted as an edge. However, an edge that is formed between colors having lightness close to each other, such as white and yellow, or black and blue, can not be extracted.
In view of this, methods for extracting edges using information other than the lightness have been conceived. Among these is a method for determining a text region based on a minimum value signal among color signals of RGB (JP-02-294884A). According to this method, it is possible to extract a contour of a highly saturated color that is adjacent to a white background. However, it is impossible to extract an edge between a highly saturated color and black. According to another method, an edge extraction is performed for each of the color components R, G, and B (JP-06-113130). In this method, it is possible to extract an edge that is formed between color combinations having a difference in any of the R, G, and B components. However, it takes a long time to perform the processing sequentially for R, G, and B, whereas parallel processing requires circuitry of an appropriate size to cope with such processing.
Additionally, there is proposed another method to use the lightness and other information. This method discloses a way to extract an edge using fuzzy inference in which priority is given to the lightness where the saturation is low, but the priority is given to the hue where the saturation is high (JP-06-333045A). According to this method, a user is required to perform instruction operation by tracing edges of a sample image for automatically generating fuzzy inference rules.